#被动技能【电磁雷达】
#玩家
execute if entity @a[distance=0.1..1.6] facing entity @p[distance=0.1..3] feet rotated ~ 0 run tp @s ^ ^ ^-3
execute if entity @a[distance=0.1..1.6] run scoreboard players set @s skCDKe 30
execute if entity @a[distance=0.1..1.6] run scoreboard players remove @s skPlayer 4

#箭
execute if entity @e[type=arrow,distance=0..4] if score Random System matches ..9 rotated ~ 0 run tp @s ^-3 ^ ^
execute if entity @e[type=arrow,distance=0..4] if score Random System matches 10.. rotated ~ 0 run tp @s ^3 ^ ^
execute if entity @e[type=arrow,distance=0..4] run scoreboard players set @s skCDKe 30
execute if entity @e[type=arrow,distance=0..4] run scoreboard players remove @s skPlayer 4

#火球
execute if entity @e[type=fireball,distance=0..4] if score Random System matches ..9 rotated ~ 0 run tp @s ^-3 ^ ^
execute if entity @e[type=fireball,distance=0..4] if score Random System matches 10.. rotated ~ 0 run tp @s ^3 ^ ^
execute if entity @e[type=fireball,distance=0..4] run scoreboard players set @s skCDKe 30
execute if entity @e[type=fireball,distance=0..4] run scoreboard players remove @s skPlayer 4

#光灵箭
execute if entity @e[type=spectral_arrow,distance=0..4] if score Random System matches ..9 rotated ~ 0 run tp @s ^-3 ^ ^
execute if entity @e[type=spectral_arrow,distance=0..4] if score Random System matches 10.. rotated ~ 0 run tp @s ^3 ^ ^
execute if entity @e[type=spectral_arrow,distance=0..4] run scoreboard players set @s skCDKe 30
execute if entity @e[type=spectral_arrow,distance=0..4] run scoreboard players remove @s skPlayer 4
